home *** CD-ROM | disk | FTP | other *** search
/ .net 2002 March / DotNetMagazine-Issue107-Coverdisc-NET107-02-03-PCMac.bin / pc / PC Software / free_browsing / DavesQckSearchDbar3-14 / dqsd.exe / searches / so.xml < prev    next >
Text File  |  2002-09-10  |  4KB  |  99 lines

  1. <search function="so">
  2.   <name>Societe.com</name>
  3.   <description>
  4.     Lookup info on French companies using a SIREN number. Non-digits characters are removed.<br/>
  5.     <div class="helpboxDescLabels">Usage:</div>
  6.     <table class="helpboxDescTable">
  7.       <tr><td>so <<i>name_or_SIREN_number</i>> [/identique] [/dirigeant:<i>chairman_last_name</i>] [/prenom:<i>chairman_first_name</i>] [/ape:<i>APE code</i>] [/departement:<i>department</i>]</td></tr>
  8.     </table>
  9.     <div class="helpboxDescLabels">Switches:</div>
  10.       <table class="helpboxDescTable">
  11.         <tr><td>/identique</td><td> - </td><td>exact name search</td></tr>
  12.         <tr><td colspan="3">the other switches are self-explanatory</td></tr>
  13.       </table>
  14.     <div class="helpboxDescLabels">Examples:</div>
  15.     <table class="helpboxDescTable">
  16.       <tr><td>so 352568091</td></tr>
  17.       <tr><td>so 352.568.091</td></tr>
  18.       <tr><td>so martin /identique /departement:75</td></tr>
  19.     </table>
  20.   </description>
  21.   <category>People and Places</category>
  22.   <link>http://www.societe.com/</link>
  23.   <contributor>MLL</contributor>
  24.   <version>2</version>
  25.  
  26.   <form name="sof"
  27.         method="get"
  28.         action="http://www.societe.com/cgi-bin/liste">
  29.     <input type="hidden" name="nom" value="" />
  30.     <input type="hidden" name="exa" value="" />
  31.     <input type="hidden" name="dirig" value="" />
  32.     <input type="hidden" name="pre" value="" />
  33.     <input type="hidden" name="ape" value="" />
  34.     <input type="hidden" name="dep" value="" />
  35.   </form>
  36.   
  37.   <script><![CDATA[
  38.     function so(q)
  39.     {
  40.       var args = parseArgs(q, "identique, dirigeant, prenom, ape, departement");
  41.       if( nullArgs("so", args.q) ) return false;
  42.  
  43.       // Replace non-digits with nothing
  44.       var re = new RegExp( "[^0-9]", "g" );
  45.       var siren = q.replace( re, "" );
  46.       if( isNaN( siren ) || siren < 100000000 || siren > 999999999 )
  47.       {
  48.         //lets initialize the fields : they're persistent
  49.         document.sof.exa.value = "";
  50.         document.sof.dirig.value = "";
  51.         document.sof.pre.value = "";
  52.         document.sof.ape.value = "";
  53.         document.sof.dep.value = "";
  54.         if( args.switches.length > 0 )
  55.         {
  56.           for( var j=0; j<args.switches.length; j++ )
  57.           {
  58.             switch( args.switches[j].name )
  59.             {
  60.               case "identique":
  61.                 document.sof.exa.value = "on";
  62.                 break;
  63.               case "dirigeant":
  64.                 document.sof.dirig.value = args.switch_val["dirigeant"];
  65.                 break;
  66.               case "prenom":
  67.                 document.sof.pre.value = args.switch_val["prenom"];
  68.                 break;
  69.               case "ape":
  70.                 document.sof.ape.value = args.switch_val["ape"];
  71.                 break;
  72.               case "departement":
  73.                 document.sof.dep.value = args.switch_val["departement"];
  74.                 break;
  75.               default:
  76.                 return nullArgs("so", "?");
  77.                 break;
  78.             } //end-switch
  79.           }
  80.         }
  81.         document.sof.nom.value = args.q;
  82.         submitForm(sof);
  83.       }
  84.       else
  85.       {
  86.         if( args.switches.length > 0 ) return nullArgs("so", "?");
  87.         openSearchWindow("http://societe.com/cgi-bin/recherche?rncs=" + siren);
  88.       }
  89.       return true;
  90.     }
  91.   ]]></script>
  92.  
  93.   <copyright>
  94.   Copyright (c) 2002 David Bau
  95.   Distributed under the terms of the
  96.   GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
  97.   </copyright>
  98. </search>
  99.